package com.qf.service.impl;

import com.qf.entity.Questions;
import com.qf.mapper.QuestionsMapper;
import com.qf.service.QuestionsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author ASUS
 * @version V1.0
 * @Project work
 * @Package com.qf.service.impl
 * @Date 2021/10/6 13:58
 */
@Service
public class QuestionsServiceImpl implements QuestionsService {

    @Autowired
    private QuestionsMapper questionsMapper;

    @Override
    public List<Questions> findAll() {
        return questionsMapper.selectByExample(null);
    }

    @Override
    public void add(Questions questions) {
        questionsMapper.insertSelective(questions);
    }

    @Override
    public void update(long id) {
        questionsMapper.updateById(id);
    }
}
